// import { PlatFormServer } from '@/api/PlatFormServer'

function bind(el, binding) {
  if (binding.value) {
    el.addEventListener('error', () => {
      if (!el.errorflag) {
        el.src = binding.value
        el.errorflag = true
      } else {
        // console.log('--防止重复加载--')
      }
    })
  }
}

export default {
  inserted: bind,
  update: bind
}
